﻿
@using (Ajax.BeginForm("ListPartialView", "Account", new AjaxOptions
    {
        HttpMethod = "POST",
        //OnBegin = "function(){ loadingPanel.Show(); }",
        //OnComplete = "function(){ loadingPanel.Hide(); }",
        UpdateTargetId = "list-users",
        InsertionMode = System.Web.Mvc.Ajax.InsertionMode.Replace
        
    }))
    {
        @UserQuery.CreateQuery(setting => {
       setting.QueryKey = QuerySettings.UserList;
           setting.Columns.Add(new QueryColumn() { Field = "name", Name = "姓名" });
           setting.Columns.Add(new QueryColumn() { Field = "deptname", Name = "所属部门" });
           setting.Columns.Add(new QueryColumn() { Field = "corpname", Name = "所属单位" });
        })
}
<div style="color:red">
    提示：只有原车管系统帐号才能新增和修改，门户系统帐号要修改请联系门户管理人员。
</div>
<hr />
<div id="list-users">
    @Html.Action("ListPartialView")
</div>
<hr />
 @Html.DevExpress().Button(settings =>
{
    settings.Name = "btnAdd";
    settings.Text = "增加用户";
    settings.Width = 120;
    settings.ControlStyle.CssClass = "button1";
    settings.ClientSideEvents.Click = "function(s, e){ location.href='" + @Url.Action("Edit", "Account")+"' }";
}).GetHtml()